import React from 'react';
import { Tooltip, TooltipProps } from 'antd';
import classnames from 'classnames';
import './index.less';

type RcTooltipProps = TooltipProps;

const RcTooltip: React.FC<RcTooltipProps> = props => {
  const { overlayClassName, children, ...restProps } = props;

  return (
    <Tooltip
      color="white"
      {...restProps}
      overlayClassName={classnames('rc-tooltip_layout', overlayClassName)}
    >
      {children}
    </Tooltip>
  );
};

export default React.memo(RcTooltip);
